package com.jfirer.redisserver.command.impl;

import com.jfirer.jnet.common.api.ProcessorContext;
import com.jfirer.redisserver.RedisCore;
import com.jfirer.redisserver.command.Command;
import com.jfirer.redisserver.command.CommandType;
import com.jfirer.redisserver.resp.Resp;
import com.jfirer.redisserver.resp.SimpleString;

public class Quit implements Command
{
    @Override
    public CommandType type()
    {
        return CommandType.quit;
    }

    @Override
    public void setContent(Resp[] array)
    {
    }

    @Override
    public void handle(ProcessorContext ctx, RedisCore redisCore)
    {
        ctx.fireWrite(SimpleString.OK);
    }
}
